<?php
$store = Mage::app()->getStore();
$code  = $store->getCode();
?>
<div class="footer-container">
    <div class="footer">
        <div class="col3-set">
            <div class="col-1">
                <h2 class="footer-title"><?php echo $this->__('Useful Links') ?></h2>
                <div class="footer-links">
                    <?php echo $this->getChildHtml('cms_footer_links') ?>
                    <?php echo $this->getChildHtml('footer_links') ?>
                </div>
            </div>
            <div class="col-2">
                <h2 class="footer-title"><?php echo $this->__('From Twitter') ?></h2>
                <?php echo $this->getChildHtml('twitterfeed'); ?>
            </div>
            <div class="col-3">
                <h2 class="footer-title"><?php echo $this->__('Contacts') ?></h2>
                <div class="footer-contacts">
                    <?php
                        if(Mage::getStoreConfig("trego_settings/footer/newsletter", $code)){
                            echo $this->getChildHtml('newsletter');
                        }
                    ?>
                    <div class="contact-info">
                    <?php echo $this->getChildHtml('cms_footer_contact') ?>
                    </div>
                </div>
            </div>
        </div>
        <div class="footer-menu">
            <?php echo $this->getChildHtml('topLinks') ?>
            <?php echo $this->getChildHtml('footer_socialIcons'); ?>
            <?php echo $this->getChildHtml('footer_copyrights'); ?>
        </div>
    </div>
    <a href="#" id="scroll-to-top">&nbsp</a>
    <script type="text/javascript">
        var windowScroll_t;
        jQuery(window).scroll(function(){
            
            clearTimeout(windowScroll_t);
            windowScroll_t = setTimeout(function() {
                                        
                if (jQuery(this).scrollTop() > 100)
                {
                    jQuery('#scroll-to-top').fadeIn();
                }
                else
                {
                    jQuery('#scroll-to-top').fadeOut();
                }
            
            }, 500);
            
        });
        
        jQuery('#scroll-to-top').click(function(){
            jQuery("html, body").animate({scrollTop: 0}, 600, "easeOutCubic");
            return false;
        });
    </script>
</div>
